<template>
  <div class="balance-panel">
    <div>
      <el-button :type="time.days === currentDays ? 'primary': 'default'" @click="handleClick(time)" size="small" v-for="(time, idx) in times" :key="idx">
        {{time.name}}
      </el-button>
    </div>
    <div class="balance-panel__data">
      <div class="balance-panel__data--count">
        总接单数: <span class="font--bold--blue">10000</span>
      </div>
      <div class="balance-panel__data--count">
        用户充值: <span class="font--bold--blue">50000元</span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      currentDays: 0,
      times: [
        { name: '全部', days: 0 },
        { name: '近七日', days: 7 },
        { name: '近一个月', days: 30 },
        { name: '近三个月', days: 90 }
      ]
    };
  },
  methods: {
    handleClick(time) {
      this.currentDays = time.days;
    }
  }
};
</script>

<style>

</style>
